
<template>
    <my-form v-model="form" @submit="submit" @cancle="cancle" ref="form" labelWidth='100px'  >
        <el-row>
             <el-col :span="24">
                <el-form-item label="清单名称：">
                    {{qdname}}
                </el-form-item>
            </el-col>
            <el-col :span="24">
                <el-form-item label="上传凭证：" prop="file">
                    <upload-new @setfile="getfile"></upload-new>
                </el-form-item>
            </el-col>
        </el-row>
    </my-form>
</template>

<script>




export default {

     props: {
        rowguid: {
            type: String,
            default: ''
        },
        qdname: {
            type: String,
            default: ''
        },
        requesturl:{
            type: String,
            default: '/bhtong/settmg/settItemChild/sett'
        }
    },
    components:{},
    data: function(){
        return{
            form:{
                file:'',
            },

        }
    }, 
    computed:{
        
    },
    watch:{
      
    },

    methods: {
        submit:function(){  
            this.$post(this.requesturl,{
                rowguid:this.rowguid,
                settFile:this.form.file,
            },function(data,res){
                if(res.code == 'v'){
                    this.cancle();
                    ShowMsg('提交成功','success');
                }else{
                    ShowMsg(res.msg,'warning');
                }
            })
        },
        cancle:function(){
            this.$emit('close');
        },
        getfile:function(val){
            this.form.file = val;
        }
    },
    mounted() {
        console.log(this.rowguid,this.qdname,this.requesturl);
    }
}
</script>

<style scoped lang="scss">




</style>
